package com.watson.guava.controller;

import com.watson.guava.annotation.RequestLimiter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;

/**
 * // todo
 *
 * @author: llun
 * @date: 2022/2/15 16:30
 * @version: 1.0
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @RequestLimiter(key = "sss")
    @GetMapping("/demo")
    public Object test() {
        return Collections.singletonMap("success", "true");
    }


    @GetMapping("/demo1")
    public Object test1() {
        return Collections.singletonMap("success", "true");
    }
}